import fetch from '@/store/base.js'

export const MOVIESTYPE = {
    inTheaters: 'in_theaters',
    comingSoon: 'coming_soon'
}

// 获取电影列表
export function fetchMovies(type, {city = '广州', start = 0, count = 20} = {}){
  // 这里的 不是 " ' " 是 “`”  ，切记切记
  console.log('--------start-------->>>' + start)
  return fetch(`movie/${type}`, { city, start, count });
}

export function fetchMoviesQuery({q, start = 0}){
  return fetch('movie/search', {q, start})
}

export function fetchMovieSubject(id){
  return fetch(`movie/subject/${id}`)
}
